﻿@using System.Data;
@using DTcms.Common;
@model DTcms.Model.BaseModel
@{
    ViewBag.Title = Model.site.name + "-" + Model.site.seo_title;
    var siteModel = (DTcms.Model.site_channel)Model.info["site_model"];
    string templateskin = Model.templateskin;
}
@section HeaderContent{

}
<!--当前位置-->
<div class="section">
    <div class="location">
        <span>当前位置：</span>
        <a href="@Html.linkurl("index")">首页</a> &gt;
        <a href="@Html.linkurl("photo")">图片分享</a>
    </div>
</div>
<!--/当前位置-->
<!--/推荐图片-->
<div class="section">
    <div class="wrapper clearfix">
        <div class="wrap-box">
            <div class="left-455" style="margin:0;">
                <div class="side-img-box">
                    @{
                        DataTable focusList = Html.get_article_list(siteModel.name, 0, 1, "status=0 and is_slide=1");
                        foreach (DataRow dr in focusList.Rows)
                        {
                            <a href="@Html.linkurl("photo_show", dr["id"])">
                                <div class="abs-bg"></div>
                                <div class="info">
                                    <h3>@dr["title"]</h3>
                                    <p>@Html.datetostr(dr["add_time"], "yyyy-MM-dd")</p>
                                </div>
                                <img src="@dr["img_url"]" />
                            </a>
                        }
                    }
                </div>
            </div>
            <div class="left-690">
                <ul class="img-list">
                    @{
                        DataTable redList = Html.get_article_list(siteModel.name, 0, 6, "status=0 and is_red=1");
                        foreach (DataRow dr in redList.Rows)
                        {
                            <li>
                                <a href="@Html.linkurl("photo_show", dr["id"])">
                                    <div class="img-box"><img src="@dr["img_url"]" /></div>
                                    <div class="abs-bg"></div>
                                    <div class="remark">
                                        <h3>@dr["title"]</h3>
                                        <p>@Html.datetostr(dr["add_time"], "yyyy-MM-dd")</p>
                                    </div>
                                </a>
                            </li>
                        } }
                </ul>
            </div>
        </div>
    </div>
</div>
<!--/推荐图片-->
<!--分类推荐-->
<div class="section">
    @{
        var categoryList = Html.get_category_child_list(siteModel.name, 0, 0);
        foreach (var cdr in categoryList)
        {
            var bcategoryList = Html.get_category_child_list(siteModel.name, cdr.id, 0);
            DataTable dt = Html.get_article_list(siteModel.name, cdr.id, 5, "status=0");
            <div class="main-tit">
                <h2>@cdr.title</h2>
                <p>
                    @foreach (var dr in bcategoryList)
                    {
                        <a href="@Html.linkurl("photo_list",dr.id)">@dr.title</a>
                    }
                    <a href="@Html.linkurl("photo_list",cdr.id)">更多<i>+</i></a>
                </p>
            </div>
            <div class="wrapper clearfix">
                <div class="wrap-box">
                    <ul class="img-list">
                        @foreach (DataRow dr in dt.Rows)
                        {
                            <li>
                                <a title="@dr["title"]" href="@Html.linkurl("photo_show",dr["id"])">
                                    <div class="img-box"><img src="@dr["img_url"]" /></div>
                                    <div class="abs-bg"></div>
                                    <div class="remark">
                                        <h3>@dr["title"]</h3>
                                        <p>@Html.datetostr(dr["add_time"], "yyyy-MM-dd")</p>
                                    </div>
                                </a>
                            </li>
                        }
                    </ul>
                </div>
            </div>
        }
    }
</div>
<!--/分类推荐-->
@section Scripts{

}
